package com.nus.servlets;

import com.nus.beans.User;
import com.nus.database.UserDBManager;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.Connection;

/**
 * Created by IntelliJ IDEA.
 * User: dell
 * Date: 9/24/12
 * Time: 8:19 PM
 * To change this template use File | Settings | File Templates.
 */
public class LoadUserInfoForUpdateServlet extends AbstractServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        doPost(request, response);
    }
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
         String targetPage = "/WEB-INF/update_user.jsp";
        request.setAttribute("targetPage", targetPage);

        RequestDispatcher requestDispatcher = request.getRequestDispatcher("viewInfo.do");
        requestDispatcher.forward(request, response);
    }
}
